 /**
  * 把中横线命名变为驼峰命名，例：font-size变成fontSize
  * @param  {string} styleStr
  */
 function camelize(styleStr:string) {
    return styleStr.replace(/-(\w)/g, function(math,p1){ 
    return p1.toUpperCase(); 
  })
 }
 //将wordWord转换为word-word 
function uncamelize(s, sep) { 
    sep = sep || '-'; 
    return s.replace(/([a-z])([A-Z])/g, function (match, p1, p2){ 
        return p1 + sep + p2.toLowerCase(); 
    }); 
} 
function isObject(s){
    return  Object.prototype.toString.call(s)==='[object Object]';
}
export function applyStyle(node:Element,str:string);
export function applyStyle(node:Element,str:any){
    if (!node||!str) {
        return;
    }
    if (typeof str==="string") {
         node["style"]=str;
    }else if (isObject(str)) {
        for (var k in str) {
        var value = str[k]
        node["style"][k] = value;
    }
    }
}